﻿using Chess.Server.Model;
using MvvmToolkit.ViewModels;

namespace Chess.Server.ViewModel
{
    public class ClientViewModel : ViewModelBase
    {
        public ClientViewModel(ClientModel model)
        {
            _clientModel = model;
        }

        private ClientModel _clientModel;

        public string IpAddress
        {
            get { return _clientModel.IpAddress; }
            set
            {
                _clientModel.IpAddress = value;
                OnPropertyChanged("IpAddress");
            }
        }

        public bool Loggined
        {
            get { return _clientModel.Loggined; }
            set
            {
                _clientModel.Loggined = value;
                OnPropertyChanged("Loggined");
            }
        }

        public string Name
        {
            get { return _clientModel.Name; }
            set
            {
                _clientModel.Name = value;
                OnPropertyChanged("Name");
            }
        }

        public int Port
        {
            get { return _clientModel.Port; }
            set
            {
                _clientModel.Port = value;
                OnPropertyChanged("Port");
            }
        }
    }
}
